import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', () => {
    const user = ref(0)
    const setUser = (u) => user.value = u
    const clearUser = () => user.value = null
    return { user, setUser, clearUser }
  })